-# Creating even empty (?!?!) directories is enough to trigger the merge
-# of the trnslations for the application menu. This isn't as ambitious
-# as described at
+# Create locversion.plist in the bundle to trigger translations for
+# the application menu and system buttons. See description at
# http://doc.qt.nokia.com/4.6/mac-differences.html#translating-the-application-menu-and-native-dialogs
-# but at least for German, it seems to work.
-#
+
+QTDIR=/Developer/Applications/Qt/translations/
+LANGDIR=objects/GPSBabelFE.app/Contents/MacOS/lang
+
+
+mkplist() {
+ D=objects/GPSBabelFE.app/Contents/Resources/$1.lproj
+ [ ! -d $D ] && mkdir $D
+ sed "s/LANGUAGE/$1/" ../tools/skeleton-locversion-plist > $D/locversion.plist
+ # optional as en, it, and hu aren't translated in Qt yet.
+ [ -f $QTDIR/qt_$1.qm ] && cp $QTDIR/qt_$1.qm $LANGDIR
+ [ -f gpsbabelfe_${1}.qm ] && cp gpsbabelfe_${1}.qm $LANGDIR
+}
cd gui
+[ ! -d $LANGDIR ] && mkdir $LANGDIR
for i in $(echo gpsbabelfe_??.ts | sed 's/gpsbabelfe_\(..\).ts/\1/g')
do
- mkdir objects/GPSBabelFE.app/Contents/Resources/$i.lproj
+ mkplist $i
done
+
+mkplist en
--- /dev/null
+ <?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
+ "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+ <plist version="1.0">
+ <dict>
+ <key>LprojCompatibleVersion</key>
+ <string>123</string>
+ <key>LprojLocale</key>
+ <string>LANGUAGE</string>
+ <key>LprojRevisionLevel</key>
+ <string>1</string>
+ <key>LprojVersion</key>
+ <string>123</string>
+ </dict>
+ </plist>